package at.tuwien.seminar.scrum1.view.error;

import at.tuwien.seminar.scrum1.model.Room;
import at.tuwien.seminar.scrum1.view.customer.list.CustomerList;
import at.tuwien.seminar.scrum1.view.room.list.RoomList;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.link.Link;

import at.tuwien.seminar.scrum1.model.Customer;
import at.tuwien.seminar.scrum1.model.Reservation;
import at.tuwien.seminar.scrum1.proxies.ReservationProxy;
import at.tuwien.seminar.scrum1.view.reservation.list.ReservationList;

public class ProblemPage extends WebPage {
	
	public ProblemPage(Reservation reservation) {

         add(new Link<Room>("roomLink") {

			@Override
			public void onClick() {
				setResponsePage(new RoomList());
			}

		});
		add(new Link<Customer>("customerLink") {

			@Override
			public void onClick() {
				setResponsePage(new CustomerList());
			}

		});

        add(new Link<Customer>("reservationLink") {

			@Override
			public void onClick() {
				setResponsePage(new ReservationList(ReservationProxy.getInstance().getAll()));
			}

		});
		
		add(new Link<Customer>("back") {

			@Override
			public void onClick() {
				setResponsePage(new ReservationList(ReservationProxy.getInstance().getAll()));

			}

		});
		
	}
	
	
}
